<template>
  <van-nav-bar
      :title="title"
      :right-text="rightText"
      :left-arrow="leftArrow"
      :fixed="true"
      @click-left="onClickLeft"
      @click-right="onClickRight"
    > 
     <template #right v-if="leftIcon">
          <van-icon :name="leftIcon" size="18" />
      </template>
    </van-nav-bar>
</template>

<script>

export default {
  name: "",
  props:{
      title:{type:String,default:''},
      rightText:{type:String,default:''},
      leftArrow:{type:Boolean,default:true},
      leftIcon:{type:String,default:""},
      isClickLeft:{type:Boolean,default:false}
  },
  data(){
   return{
    
   }
  },
  mounted() {},
  methods: {
   onClickLeft(){
     if(this.isClickLeft){
         this.$emit('onClickLeft',"")
     }else{
        this.$router.go(-1)
     }
     
   },
   onClickRight(){
     this.$emit('onClickRight',"")
   }
  },
  components: {},
};
</script>

<style>

</style>
